home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / CODING / WINDOWS / EZNET.ZIP / DEMO.ZIP / MDI.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-12-10  |  9.7 KB  |  330 lines

  1. VERSION 4.00
  2. Begin VB.MDIForm MDI1 
  3.    Appearance      =   0  'Flat
  4.    BackColor       =   &H8000000C&
  5.    Caption         =   "Wellcome to EasyNet OCX!!"
  6.    ClientHeight    =   5040
  7.    ClientLeft      =   1170
  8.    ClientTop       =   1725
  9.    ClientWidth     =   7965
  10.    Height          =   5730
  11.    Left            =   1110
  12.    LinkTopic       =   "MDI1"
  13.    Top             =   1095
  14.    Width           =   8085
  15.    Begin VB.PictureBox Picture1 
  16.       Align           =   1  'Align Top
  17.       Appearance      =   0  'Flat
  18.       BackColor       =   &H00E0E0E0&
  19.       BorderStyle     =   0  'None
  20.       FillColor       =   &H00C0C0C0&
  21.       BeginProperty Font 
  22.          name            =   "MS Sans Serif"
  23.          charset         =   0
  24.          weight          =   700
  25.          size            =   8.25
  26.          underline       =   0   'False
  27.          italic          =   0   'False
  28.          strikethrough   =   0   'False
  29.       EndProperty
  30.       ForeColor       =   &H80000008&
  31.       Height          =   525
  32.       Left            =   0
  33.       ScaleHeight     =   525
  34.       ScaleWidth      =   7965
  35.       TabIndex        =   0
  36.       Top             =   0
  37.       Width           =   7965
  38.       Begin VB.CommandButton Command5 
  39.          Appearance      =   0  'Flat
  40.          BackColor       =   &H80000005&
  41.          Caption         =   "Comments..."
  42.          BeginProperty Font 
  43.             name            =   "MS Sans Serif"
  44.             charset         =   0
  45.             weight          =   400
  46.             size            =   9.75
  47.             underline       =   0   'False
  48.             italic          =   0   'False
  49.             strikethrough   =   0   'False
  50.          EndProperty
  51.          Height          =   405
  52.          Left            =   105
  53.          TabIndex        =   1
  54.          Top             =   45
  55.          Width           =   3765
  56.       End
  57.       Begin VB.Line Line1 
  58.          X1              =   0
  59.          X2              =   8700
  60.          Y1              =   600
  61.          Y2              =   600
  62.       End
  63.    End
  64.    Begin VB.Menu FileMenu 
  65.       Caption         =   "&File"
  66.       Begin VB.Menu PrintformMenu 
  67.          Caption         =   "&Print form"
  68.       End
  69.       Begin VB.Menu Exitmenu 
  70.          Caption         =   "&Exit"
  71.       End
  72.    End
  73.    Begin VB.Menu EditMenu 
  74.       Caption         =   "&Edit"
  75.       Begin VB.Menu CopyMenu 
  76.          Caption         =   "&Copy to clipboard"
  77.       End
  78.       Begin VB.Menu DeleteMenu 
  79.          Caption         =   "&Delete selected items"
  80.       End
  81.       Begin VB.Menu SEPARATOR1 
  82.          Caption         =   "-"
  83.       End
  84.       Begin VB.Menu SelectAllMenu 
  85.          Caption         =   "Select &all"
  86.       End
  87.       Begin VB.Menu SEPARATOR3 
  88.          Caption         =   "-"
  89.       End
  90.       Begin VB.Menu SelectModeMenu 
  91.          Caption         =   "Select &Mode"
  92.       End
  93.    End
  94.    Begin VB.Menu ShowMenu 
  95.       Caption         =   "&Show"
  96.       Begin VB.Menu ShowExample 
  97.          Caption         =   "&WorkFlow"
  98.          Index           =   0
  99.       End
  100.       Begin VB.Menu ShowExample 
  101.          Caption         =   "&NetWork"
  102.          Index           =   1
  103.       End
  104.       Begin VB.Menu ShowExample 
  105.          Caption         =   "&Diagram"
  106.          Index           =   2
  107.       End
  108.       Begin VB.Menu ShowExample 
  109.          Caption         =   "&FlowChart"
  110.          Index           =   3
  111.       End
  112.    End
  113.    Begin VB.Menu ZoomMenu 
  114.       Caption         =   "&Zoom"
  115.       Begin VB.Menu ZoomValueMenu 
  116.          Caption         =   "&100% (Normal)"
  117.          Index           =   0
  118.       End
  119.       Begin VB.Menu ZoomValueMenu 
  120.          Caption         =   "&200%"
  121.          Index           =   1
  122.       End
  123.       Begin VB.Menu ZoomValueMenu 
  124.          Caption         =   "&50%"
  125.          Index           =   2
  126.       End
  127.       Begin VB.Menu ZoomValueMenu 
  128.          Caption         =   "0% (Fit in Window)"
  129.          Index           =   3
  130.       End
  131.    End
  132.    Begin VB.Menu CapabilitiesMenu 
  133.       Caption         =   "&Capabilities"
  134.       Begin VB.Menu MultiSelectionMenu 
  135.          Caption         =   "Multi &Selection"
  136.       End
  137.       Begin VB.Menu ReadOnlyMenu 
  138.          Caption         =   "&Read Only"
  139.       End
  140.       Begin VB.Menu CanSizeNodeMenu 
  141.          Caption         =   "Can Si&ze node"
  142.       End
  143.       Begin VB.Menu CanMoveNodemenu 
  144.          Caption         =   "Can &Move node"
  145.       End
  146.       Begin VB.Menu CanStretchLinkMenu 
  147.          Caption         =   "Can S&tretch link"
  148.       End
  149.       Begin VB.Menu CanMultiLinkMenu 
  150.          Caption         =   "Can M&ulti link"
  151.       End
  152.       Begin VB.Menu CanDrawNodeMenu 
  153.          Caption         =   "Can Draw &Node"
  154.       End
  155.       Begin VB.Menu CanDrawLinkMenu 
  156.          Caption         =   "Can Draw &Link"
  157.       End
  158.       Begin VB.Menu AutoScrollMenu 
  159.          Caption         =   "&AutoScroll"
  160.       End
  161.    End
  162.    Begin VB.Menu WindowMenu 
  163.       Caption         =   "&Window"
  164.       WindowList      =   -1  'True
  165.       Begin VB.Menu CascadeMenu 
  166.          Caption         =   "&Cascade"
  167.       End
  168.       Begin VB.Menu TileMenu 
  169.          Caption         =   "&Tile"
  170.       End
  171.       Begin VB.Menu ReorganizeMenu 
  172.          Caption         =   "&Reorganize"
  173.       End
  174.    End
  175.    Begin VB.Menu InfoMenu 
  176.       Caption         =   "&Info"
  177.       Begin VB.Menu AboutMenu 
  178.          Caption         =   "&About..."
  179.       End
  180.    End
  181. Attribute VB_Name = "MDI1"
  182. Attribute VB_Creatable = False
  183. Attribute VB_Exposed = False
  184. Option Explicit
  185. Const CASCADE = 0
  186. Const MOZAIQUE_HORIZONTALE = 1
  187. Const MOZAIQUE_VERTICALE = 2
  188. Const REORGANISER_ICONES = 3
  189. Private Sub AboutMenu_Click()
  190.   MsgBox "EasyNet demonstration" + Chr(13) + "Copyright 
  191.  1994-1996 by Patrick Lassalle"
  192. End Sub
  193. Private Sub AutoScrollMenu_Click()
  194.   If ActiveForm Is Nothing Then Exit Sub
  195.   ActiveForm.Net1.item = 0
  196.   ActiveForm.Net1.AutoScroll = Not ActiveForm.Net1.AutoScroll
  197.   AutoScrollMenu.Checked = ActiveForm.Net1.AutoScroll
  198. End Sub
  199. Private Sub CanDrawLinkMenu_Click()
  200.   If ActiveForm Is Nothing Then Exit Sub
  201.   ActiveForm.Net1.item = 0
  202.   ActiveForm.Net1.CanDrawLink = Not ActiveForm.Net1.CanDrawLink
  203.   CanDrawLinkMenu.Checked = ActiveForm.Net1.CanDrawLink
  204. End Sub
  205. Private Sub CanDrawNodeMenu_Click()
  206.   If ActiveForm Is Nothing Then Exit Sub
  207.   ActiveForm.Net1.CanDrawNode = Not ActiveForm.Net1.CanDrawNode
  208.   CanDrawNodeMenu.Checked = ActiveForm.Net1.CanDrawNode
  209. End Sub
  210. Private Sub CanMoveNodemenu_Click()
  211.   If ActiveForm Is Nothing Then Exit Sub
  212.   ActiveForm.Net1.item = 0
  213.   ActiveForm.Net1.CanMoveNode = Not ActiveForm.Net1.CanMoveNode
  214.   CanMoveNodemenu.Checked = ActiveForm.Net1.CanMoveNode
  215. End Sub
  216. Private Sub CanMultiLinkMenu_Click()
  217.   If ActiveForm Is Nothing Then Exit Sub
  218.   ActiveForm.Net1.CanMultiLink = Not ActiveForm.Net1.CanMultiLink
  219.   CanMultiLinkMenu.Checked = ActiveForm.Net1.CanMultiLink
  220. End Sub
  221. Private Sub CanSizeNodeMenu_Click()
  222.   If ActiveForm Is Nothing Then Exit Sub
  223.   ActiveForm.Net1.item = 0
  224.   ActiveForm.Net1.CanSizeNode = Not ActiveForm.Net1.CanSizeNode
  225.   CanSizeNodeMenu.Checked = ActiveForm.Net1.CanSizeNode
  226. End Sub
  227. Private Sub CanStretchLinkMenu_Click()
  228.   If ActiveForm Is Nothing Then Exit Sub
  229.   ActiveForm.Net1.item = 0
  230.   ActiveForm.Net1.CanStretchLink = Not ActiveForm.Net1.CanStretchLink
  231.   CanStretchLinkMenu.Checked = ActiveForm.Net1.CanStretchLink
  232. End Sub
  233. Private Sub CascadeMenu_Click()
  234.   Arrange CASCADE
  235. End Sub
  236. Private Sub Command5_Click()
  237.   If ActiveForm Is Nothing Then Exit Sub
  238.   frmComments.Show 1
  239. End Sub
  240. Private Sub CopyMenu_Click()
  241.   If ActiveForm Is Nothing Then Exit Sub
  242.   ActiveForm.Net1.CopyAll
  243. End Sub
  244. Private Sub DeleteMenu_Click()
  245.   If ActiveForm Is Nothing Then Exit Sub
  246.   ActiveForm.Net1.DeleteSel
  247. End Sub
  248. Private Sub Exitmenu_Click()
  249.   Unload Me
  250. End Sub
  251. Private Sub MDIForm_Load()
  252.   Me.WindowState = 2
  253.   Form1.Show
  254.   Form2.Show
  255.   Form3.Show
  256.   Form4.Show
  257.   TileMenu_Click
  258. End Sub
  259. Private Sub MDIForm_Resize()
  260.   Line1.X1 = 0
  261.   Line1.X2 = ScaleWidth
  262. End Sub
  263. Private Sub MultiSelectionMenu_Click()
  264.   If ActiveForm Is Nothing Then Exit Sub
  265.   ActiveForm.Net1.MultiSel = Not ActiveForm.Net1.MultiSel
  266.   MultiSelectionMenu.Checked = ActiveForm.Net1.MultiSel
  267.   ActiveForm.Net1.EditAction = 4
  268. End Sub
  269. Private Sub PrintformMenu_Click()
  270.   ActiveForm.PrintForm
  271. End Sub
  272. Private Sub ReadOnlyMenu_Click()
  273.   If ActiveForm Is Nothing Then Exit Sub
  274.   ActiveForm.Net1.ReadOnly = Not ActiveForm.Net1.ReadOnly
  275.   ReadOnlyMenu.Checked = ActiveForm.Net1.ReadOnly
  276.   ActiveForm.Net1.EditAction = 4
  277. End Sub
  278. Private Sub ReorganizeMenu_Click()
  279.   Arrange REORGANISER_ICONES
  280. End Sub
  281. Private Sub SelectAllMenu_Click()
  282.   If ActiveForm Is Nothing Then Exit Sub
  283.   ActiveForm.Net1.SelectAll
  284. End Sub
  285. Private Sub SelectModeMenu_Click()
  286.   If ActiveForm Is Nothing Then Exit Sub
  287.   ActiveForm.Net1.SelectMode = Not ActiveForm.Net1.SelectMode
  288.   If ActiveForm.Net1.SelectMode = True Then
  289.     SelectModeMenu.Checked = True
  290.     ActiveForm.Net1.MousePointer = 2
  291.   Else
  292.     SelectModeMenu.Checked = False
  293.     ActiveForm.Net1.MousePointer = 0
  294.   End If
  295. End Sub
  296. Private Sub ShowExample_Click(Index As Integer)
  297.   Select Case Index
  298.   Case 0
  299.     Form1.Show
  300.   Case 1
  301.     Form2.Show
  302.   Case 2
  303.     Form3.Show
  304.   Case 3
  305.     Form4.Show
  306.   End Select
  307. End Sub
  308. Private Sub TileMenu_Click()
  309.   Arrange MOZAIQUE_HORIZONTALE
  310. End Sub
  311. Private Sub ZoomValueMenu_Click(Index As Integer)
  312.   Dim Zoom%, i%
  313.   If ActiveForm Is Nothing Then Exit Sub
  314.   For i = 0 To 3
  315.     ZoomValueMenu(i).Checked = False
  316.   Next
  317.   Select Case Index
  318.   Case 0
  319.     Zoom = 100
  320.   Case 1
  321.     Zoom = 200
  322.   Case 2
  323.     Zoom = 50
  324.   Case 3
  325.     Zoom = 0
  326.   End Select
  327.   ZoomValueMenu(Index).Checked = True
  328.   ActiveForm.Net1.Zoom = Zoom
  329. End Sub
  330.